<template>
  <div>
    <h1>Hello World</h1>
    <p>This is a simple example of a Vue.js component.</p>
    <el-row>
      <el-button @click="demoStore.decrement()">-</el-button>
      <el-col :span="1">
        <el-input v-model="count"></el-input>
      </el-col>
      <el-button @click="increment">+</el-button>
    </el-row>
  </div>
</template>

<script setup>
import useDemoStore from '../store/count.js';
import { storeToRefs } from 'pinia';

const demoStore = useDemoStore();
const { count } = storeToRefs(demoStore);

const increment = async () => {
  demoStore.increment();
}

</script>

<style scoped>
</style>